package com.chen.web;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @decription
 * @atuhor:陈红卫
 * @create : 2017-06-21-17:41
 */
@RestController
public class TestController {

    final Logger logger = LoggerFactory.getLogger(TestController.class);


    @RequestMapping(value = "trace2",method = RequestMethod.GET)
    public String Trace2(HttpServletRequest request){
        logger.info("<< trace2  >>");
        logger.info("X-B3-TraceId:{}",request.getHeader("X-B3-TraceId"));
        logger.info("X-B3-ParentSpanId:{}",request.getHeader("X-B3-ParentSpanId"));
        logger.info("X-Span-Name",request.getHeader("X-Span-Name"));
        return "trace2";
    }



}
